Skip to content

Fix memory writing for other proccesses on linux#19

Closed
BonePolk wants to merge 8 commits intoJeanExtreme002:masterfrom
BonePolk:master
Closed

Fix memory writing for other proccesses on linux#19
BonePolk wants to merge 8 commits intoJeanExtreme002:masterfrom
BonePolk:master

Conversation

@BonePolk
Copy link
Contributor

@BonePolk BonePolk commented Jan 5, 2026

process_vm_writev system call is more secure than manual mem file patching

"""
Write a value to a memory address.
"""
if pytype not in [bool, int, float, str, bytes]:
Copy link
Owner

@JeanExtreme002 JeanExtreme002 Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why removing this check? @BonePolk

@JeanExtreme002
Copy link
Owner

JeanExtreme002 commented Feb 18, 2026

Hi @BonePolk. Thanks for your contribution!

Although writing directly to /proc/<pid>/mem is simpler and more straightforward, using the process_vm_writev system call is generally safer and tends to be faster in a generic scenario. It avoids relying on the /proc file interface, is designed specifically for cross-process memory copying, and can reduce overhead — especially when handling larger writes or multiple regions. Due to it, I'm closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments